dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Add support for 'es-formal'"
[lhc/web/wiklou.git]
/
includes
/
ServiceWiring.php
diff --git
a/includes/ServiceWiring.php
b/includes/ServiceWiring.php
index
dab3b5c
..
8b0452d
100644
(file)
--- a/
includes/ServiceWiring.php
+++ b/
includes/ServiceWiring.php
@@
-47,6
+47,7
@@
use MediaWiki\Shell\CommandFactory;
use MediaWiki\Storage\BlobStoreFactory;
use MediaWiki\Storage\RevisionStore;
use MediaWiki\Storage\SqlBlobStore;
use MediaWiki\Storage\BlobStoreFactory;
use MediaWiki\Storage\RevisionStore;
use MediaWiki\Storage\SqlBlobStore;
+use Wikimedia\ObjectFactory;
return [
'DBLoadBalancerFactory' => function ( MediaWikiServices $services ) {
return [
'DBLoadBalancerFactory' => function ( MediaWikiServices $services ) {
@@
-163,7
+164,8
@@
return [
$store = new WatchedItemStore(
$services->getDBLoadBalancer(),
new HashBagOStuff( [ 'maxKeys' => 100 ] ),
$store = new WatchedItemStore(
$services->getDBLoadBalancer(),
new HashBagOStuff( [ 'maxKeys' => 100 ] ),
- $services->getReadOnlyMode()
+ $services->getReadOnlyMode(),
+ $services->getMainConfig()->get( 'UpdateRowsPerQuery' )
);
$store->setStatsdDataFactory( $services->getStatsdDataFactory() );
);
$store->setStatsdDataFactory( $services->getStatsdDataFactory() );
@@
-175,7
+177,10
@@
return [
},
'WatchedItemQueryService' => function ( MediaWikiServices $services ) {
},
'WatchedItemQueryService' => function ( MediaWikiServices $services ) {
- return new WatchedItemQueryService( $services->getDBLoadBalancer() );
+ return new WatchedItemQueryService(
+ $services->getDBLoadBalancer(),
+ $services->getCommentStore()
+ );
},
'CryptRand' => function ( MediaWikiServices $services ) {
},
'CryptRand' => function ( MediaWikiServices $services ) {
@@
-394,8
+399,6
@@
return [
$id = 'apc';
} elseif ( function_exists( 'apcu_fetch' ) ) {
$id = 'apcu';
$id = 'apc';
} elseif ( function_exists( 'apcu_fetch' ) ) {
$id = 'apcu';
- } elseif ( function_exists( 'xcache_get' ) && wfIniGetBool( 'xcache.var_size' ) ) {
- $id = 'xcache';
} elseif ( function_exists( 'wincache_ucache_get' ) ) {
$id = 'wincache';
} else {
} elseif ( function_exists( 'wincache_ucache_get' ) ) {
$id = 'wincache';
} else {
@@
-473,15
+476,26
@@
return [
$store = new RevisionStore(
$services->getDBLoadBalancer(),
$blobStore,
$store = new RevisionStore(
$services->getDBLoadBalancer(),
$blobStore,
- $services->getMainWANObjectCache()
+ $services->getMainWANObjectCache(),
+ $services->getCommentStore()
);
);
+ $store->setLogger( LoggerFactory::getInstance( 'RevisionStore' ) );
+
$config = $services->getMainConfig();
$store->setContentHandlerUseDB( $config->get( 'ContentHandlerUseDB' ) );
return $store;
},
$config = $services->getMainConfig();
$store->setContentHandlerUseDB( $config->get( 'ContentHandlerUseDB' ) );
return $store;
},
+ 'RevisionLookup' => function ( MediaWikiServices $services ) {
+ return $services->getRevisionStore();
+ },
+
+ 'RevisionFactory' => function ( MediaWikiServices $services ) {
+ return $services->getRevisionStore();
+ },
+
'BlobStoreFactory' => function ( MediaWikiServices $services ) {
global $wgContLang;
return new BlobStoreFactory(
'BlobStoreFactory' => function ( MediaWikiServices $services ) {
global $wgContLang;
return new BlobStoreFactory(
@@
-512,6
+526,14
@@
return [
return new \MediaWiki\Http\HttpRequestFactory();
},
return new \MediaWiki\Http\HttpRequestFactory();
},
+ 'CommentStore' => function ( MediaWikiServices $services ) {
+ global $wgContLang;
+ return new CommentStore(
+ $wgContLang,
+ $services->getMainConfig()->get( 'CommentTableSchemaMigrationStage' )
+ );
+ }
+
///////////////////////////////////////////////////////////////////////////
// NOTE: When adding a service here, don't forget to add a getter function
// in the MediaWikiServices class. The convenience getter should just call
///////////////////////////////////////////////////////////////////////////
// NOTE: When adding a service here, don't forget to add a getter function
// in the MediaWikiServices class. The convenience getter should just call